package org.jsoft.model;

import java.awt.Color;
import java.awt.Graphics;
import java.awt.image.BufferedImage;

import javax.swing.JPanel;
import javax.swing.border.LineBorder;

import org.jsoft.constants.ImageConstants;

public class Bomb extends JPanel{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private BufferedImage[] pic = ImageConstants.blastArr;
	private int picIndex = 0;

	public void init() {
		this.setSize(pic[0].getWidth(), pic[0].getHeight());
//		this.setBorder(new LineBorder(Color.white));
	}

	protected void paintComponent(Graphics g) {
		g.drawImage(pic[picIndex % pic.length], 0, 0, null);
		picIndex++;
	}
}
